home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 08 FPS, RTS, and RPG AI / 06 Alt, King / Listing1.cpp next >
Encoding:
C/C++ Source or Header  |  2001-12-09  |  1.2 KB  |  49 lines

  1. /* Copyright (C) Greg Alt and Kristin King, 2001. 
  2.  * All rights reserved worldwide.
  3.  *
  4.  * This software is provided "as is" without express or implied
  5.  * warranties. You may freely copy and compile this source into
  6.  * applications you distribute provided that the copyright text
  7.  * below is included in the resulting source code, for example:
  8.  * "Portions Copyright (C) Greg Alt and Kristin King, 2001"
  9.  */
  10.  
  11. // The following pseudo-code shows the main components of 
  12. // classes EventID and AIEvent.
  13.  
  14. class EventID
  15. {
  16. public:
  17.     EventID(SubjectGrp, Verb, ObjectGrp, ObjectIndividual);
  18.     Group GetSubjectGroup();
  19.     Verb GetVerb();
  20.     Group GetObjectGroup();
  21.     UniqueID GetObjectIndividual();
  22.  
  23. private:
  24.     int64 id;
  25. };
  26.  
  27. class AIEvent
  28. {
  29. public:
  30. AIEvent(SubjectGrp, Verb, ObjectGrp, ObjectIndividual, TimeStamp,
  31. Lifetime, EventTemplate);
  32.     EventID GetID();
  33.     Point3D GetPosition();
  34.     Time GetTimeStamp();
  35.     int GetMagnitude();
  36.     TemplateID GetEventTemplate();
  37.     int IncrementReferenceCount();
  38.     int DecrementReferenceCount();
  39.  
  40. private:
  41.     EventID id;
  42.     Point3D Position;
  43.     Time TimeStamp;
  44.     int Magnitude;
  45.     Template EventTemplate;
  46.     int ReferenceCount;
  47. };
  48.  
  49.